package com.lg.wxq.bean;

import java.util.Date;

import com.lg.wxq.utils.DebugUtils;
import com.lg.wxq.utils.TimeUtils;


public class Status extends Bean {
	private String idstr;// 字符串型的微博ID
	private String created_at;// 创建时间
	private long id;// 微博ID
	private String text;// 微博信息内容
	private String source;// 微博来源
	private boolean favorited;// 是否已收藏
	private boolean truncated;// 是否被截断
	private String in_reply_to_status_id;// 回复ID
	private String in_reply_to_user_id;// 回复人UID
	private String in_reply_to_screen_name;// 回复人昵称
	private long mid;// 微博MID
	private String bmiddle_pic;// 中等尺寸图片地址
	private String original_pic;// 原始图片地址
	private String thumbnail_pic;// 缩略图片地址
	private int reposts_count;// 转发数
	private int comments_count;// 评论数
	private String annotations;// 微博附加注释信息
	private Geo geo;// 地理信息字段
	private User user;// 微博作者的用户信息字段
	private Status retweeted_status;
	private Visible visible;
	private int mlevel;
	private String time;
	
	public int getMlevel() {
		return mlevel;
	}
	public void setMlevel(int mlevel) {
		this.mlevel = mlevel;
	}
	public Visible getVisible() {
		return visible;
	}
	public void setVisible(Visible visible) {
		this.visible = visible;
	}
	public String getIdstr() {
		return idstr;
	}
	public void setIdstr(String idstr) {
		this.idstr = idstr;
	}
	public String getCreated_at() {
		return created_at;
	}
	public void setCreated_at(String created_at) {
		this.created_at = created_at;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public boolean isFavorited() {
		return favorited;
	}
	public void setFavorited(boolean favorited) {
		this.favorited = favorited;
	}
	public boolean isTruncated() {
		return truncated;
	}
	public void setTruncated(boolean truncated) {
		this.truncated = truncated;
	}
	public String getIn_reply_to_screen_name() {
		return in_reply_to_screen_name;
	}
	public void setIn_reply_to_screen_name(String in_reply_to_screen_name) {
		this.in_reply_to_screen_name = in_reply_to_screen_name;
	}
	public Long getMid() {
		return mid;
	}
	public void setMid(Long mid) {
		this.mid = mid;
	}
	public String getBmiddle_pic() {
		return bmiddle_pic;
	}
	public void setBmiddle_pic(String bmiddle_pic) {
		this.bmiddle_pic = bmiddle_pic;
	}
	public String getOriginal_pic() {
		return original_pic;
	}
	public void setOriginal_pic(String original_pic) {
		this.original_pic = original_pic;
	}
	public String getThumbnail_pic() {
		return thumbnail_pic;
	}
	public void setThumbnail_pic(String thumbnail_pic) {
		this.thumbnail_pic = thumbnail_pic;
	}
	public int getReposts_count() {
		return reposts_count;
	}
	public void setReposts_count(int reposts_count) {
		this.reposts_count = reposts_count;
	}
	public int getComments_count() {
		return comments_count;
	}
	public void setComments_count(int comments_count) {
		this.comments_count = comments_count;
	}
	public String getAnnotations() {
		return annotations;
	}
	public void setAnnotations(String annotations) {
		this.annotations = annotations;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	public void setMid(long mid) {
		this.mid = mid;
	}
	public Geo getGeo() {
		return geo;
	}
	public void setGeo(Geo geo) {
		this.geo = geo;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public void setRetweeted_status(Status retweeted_status) {
		this.retweeted_status = retweeted_status;
	}
	public Status getRetweeted_status() {
		return retweeted_status;
	}
	public String getIn_reply_to_status_id() {
		return in_reply_to_status_id;
	}
	public void setIn_reply_to_status_id(String in_reply_to_status_id) {
		this.in_reply_to_status_id = in_reply_to_status_id;
	}
	public String getIn_reply_to_user_id() {
		return in_reply_to_user_id;
	}
	public void setIn_reply_to_user_id(String in_reply_to_user_id) {
		this.in_reply_to_user_id = in_reply_to_user_id;
	}
	public String getTime() {
		if(time==null||!created_at.equals(time)){
			Date date=new Date(created_at);
			created_at=time=TimeUtils.getShowTimeString(date);
		}
		return time;
	}
	public String getFrom() {
		int startIndex = source.indexOf(">")+1;
		int endIndex = source.indexOf("</");
		return "来自:"+source.substring(startIndex, endIndex);
	}
	public void setTime(String time) {
		this.time = time;
	}

}
